package com.badoni.mvc;




import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;

import org.mortbay.jetty.webapp.WebAppContext;
public class RunUx {

	public static void main(String[] args) throws Exception {
		Server server = new Server();
		Connector connector = new SelectChannelConnector();
		connector.setPort(8081);

		String jetty_home = System.getProperty("jetty.home", "./");
		server.setConnectors(new Connector[] { connector});

		WebAppContext webapp = new WebAppContext();
		webapp.setContextPath("/");
		webapp.setWar(jetty_home + "src/main/webapp");
		webapp.setDefaultsDescriptor(jetty_home + "src/test/resources/webdefault.xml");

		webapp.setServerClasses(new String[] { "-org.mortbay.jetty.plus.jaas.", "org.mortbay.jetty." });

		server.setHandler(webapp);
		server.start();
		server.join();
	}
	
}
